import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  //查询债券日历
  queryBondCalendar: (query) => api.get(`${config.interfaces.type3}bondInfo/bondCalendar/`, query),
  //查询发行数据
  queryBondIssuerInfoDetail: (query) => api.get(`${config.interfaces.type5}instrument-server/bond/bondIssuerInfoDetail`, query),
  //查询债券基础信息
  queryBondBasicInfoDetail: (query) => api.get(`${config.interfaces.type3}bondInfo/bondBasicInfoDetail/`, query),
  //查询头部基础信息
  queryBasicInfoSnapshot: (query) => api.get(`${config.interfaces.type3}bondInfo/basicInfoSnapshot/`, query),
  //查询主营业务
  queryMainIncom: (query) => api.get(`${config.interfaces.type3}bondInfo/comBusinessDistribution/`, query),
  //查询流通市场
  queryMarket: (query) => api.get(`${config.interfaces.type3}bondInfo/tradingMarketInfo/`, query),
  //查询债券基本信息
  queryBaseInfo: (query) => api.get(`${config.interfaces.type1}bondTrade/queryBondInfo`, query),
  //查询资讯信息
  queryBaseInfoZx: (query) => api.get(`${config.interfaces.type1}bondTrade/queryBondZxInfo`, query),
  //查询日期下拉列表
  queryDateList: (query) => api.get(`${config.interfaces.type3}bondInfo/issuerFinancialReportDateList/`, query),
  //查询财务数据
  queryComFinancial: (query) => api.get(`${config.interfaces.type3}bondInfo/issuerFinancialIndicator/`, query),
  //查询估值数据
  // valuationDetails: query => api.get(`${config.interfaces.type5}instrument-server/bond/valuationDetail`, query),
  valuationDetails: (query) => api.get(`${config.interfaces.type3}bondInfo/valuationDetail`, query),
  //估值数据导出
  valuationDetailsExport: (query) => api.get(`${config.interfaces.type5}instrument-server/bond/valuationDetailExport`, query),
  //获取异常交易列表
  queryBondAbnormalTrade: (query) => api.get(`${config.interfaces.type3}bondInfo/bondAbnormalTrade/`, query),
  //获取历史行情
  queryBondQuote: (query) => api.get(`${config.interfaces.type3}bondInfo/bondQuote/`, query),
  //获取债券简称
  queryBondName: (query) => api.get(`${config.interfaces.type5}instrument-server/bond/queryCode`, query),

  //查询个券组列表
  getSecurityGroups: (query) => api.get(`${config.interfaces.type5}portfolio-server/user_concern/group/getSecurityGroups`, query),

  //查询主体组列表
  getCompanyGroups: (query) => api.get(`${config.interfaces.type5}portfolio-server/user_concern/group/getCompanyGroups`, query),

  //更新个券组关注
  updateSecurityGroups: (query) => api.post(`${config.interfaces.type5}portfolio-server/user_concern/group/updateSecurityDetailByGroupIds`, query),

  //更新主体组关注
  updateCompanyGroups: (query) => api.post(`${config.interfaces.type5}portfolio-server/user_concern/group/updateCompanyDetailByGroupIds`, query),
  //查询持仓日期
  queryHoldDataList: (query) => api.get(`${config.interfaces.type5}instrument-server/bndRegulation/getPositionDate`, query),
  // 查询日终偏离监控
  queryBondDeviationMonitoring: (query) => api.get(`${config.interfaces.type5}instrument-server/bondDeviationAnalysis/getDayEndDeviationAnalysisInfo`, query),
};
